package com.hnevc.xiewenguang;

import java.util.Scanner;

public class Example01 {

    public static void main(String[] args) {
        int a=0, e=0;
        int i=0, o=0,u=0,y;
        Scanner scanner=new Scanner(System.in);
        System.out.print("输入字符串:");
        String str= scanner.next();
        for(y=0;y<str.length();y++)
        {
            switch (str.charAt(y)) {
                case 'a' : a++;continue;
                case 'e' : e++;continue;
                case 'i' : i++;continue;
                case 'o' : o++;continue;
                case 'u' : u++;continue;
                default: System.out.println(str.charAt(y)+"不是元音");
            }
        }
        System.out.printf("a："+a+"\ne："+e+"\ni："+i+"\no："+o+"\nu："+u);
    }
}
